x86/hvm: vmx/svm_cpu_up_prepare should be called only once
authorBoris Ostrovsky <boris.ostrovsky@oracle.com>
Fri, 25 Aug 2017 12:07:12 +0000 (14:07 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 25 Aug 2017 12:07:12 +0000 (14:07 +0200)
commit91b80133291c11db957f2b122d3d812b8d504f7a
treec511d3e6c10b028a317b5298a1d0147879c23572
parent03cbbdbbb7896f11b91ab9d1c00dd9ffbfbfa7bc
x86/hvm: vmx/svm_cpu_up_prepare should be called only once

These routines are first called via CPU_UP_PREPARE notifier by
the BSP and then by the booting ASP from vmx_cpu_up()/_svm_cpu_up().

Avoid the unnecessary second call. Because BSP doesn't go through
CPU_UP_PREPARE it is a special case. We pass 'bsp' flag to newly
added _vmx_cpu_up() (just like it's already done for _svm_cpu_up())
so they can decide whether or not to call vmx/svm_cpu_up_prepare().

Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
xen/arch/x86/hvm/svm/svm.c
xen/arch/x86/hvm/vmx/vmcs.c
xen/arch/x86/hvm/vmx/vmx.c
xen/include/asm-x86/hvm/vmx/vmcs.h